package ru.ibrae.mchs.radiation.common.excelEntities;

import java.util.ArrayList;

public class ExcelOldRajon {

    private String name;
    private ArrayList<ExcelSelsovet> excelSelsovet = new ArrayList<ExcelSelsovet>();
    private ArrayList<ExcelGeoobject> excelGeoobjects = new ArrayList<ExcelGeoobject>();

    public ExcelOldRajon(String name) {
        this.name = name;
    }

    public String getName() {
        return name;
    }

    public ArrayList<ExcelSelsovet> getExcelSelsovet() {
        return excelSelsovet;
    }

    public ArrayList<ExcelGeoobject> getExcelGeoobjects() {
        return excelGeoobjects;
    }

    @Override
    public boolean equals(Object obj) {
        if (obj instanceof ExcelOldRajon) {
            ExcelOldRajon excelOldRajon = (ExcelOldRajon) obj;
            if (excelOldRajon.getName().equalsIgnoreCase(this.getName())) {
                return true;
            }
        }
        return false;
    }

    @Override
    public int hashCode() {
        int hash = 5;
        hash = 67 * hash + (this.name != null ? this.name.hashCode() : 0);
        return hash;
    }
}
